import request from '@/utils/request'
export default{
  //远程搜索课程信息
  remotegetcoursetitle(query){
    return request({
      url: `/eduservice/uicourse/remote/${query}`,
      method: 'get'
    })
  },
  seachcourseinfo(title){
    return request({
      url: `/eduservice/uicourse/seachcourse/${title}`,
      method: 'get'
    })
  },
  //获取一级二级分类
  getsubjects(){
    return request({
      url: `/eduservice/uicourse/displaysubjecttree`,
      method: 'get'
    })
  },
  //三个条件的查询
  getcourseinfobyt(uiCourseVoquery){
    return request({
      url: `/eduservice/educourse/querybythree`,
      method: 'post',
      data: uiCourseVoquery
    })
  },
  //课程详情页数据 课程 讲师  课程简介  章节信息
  getcourseinfo(courseid){
    return request({
      url: `/eduservice/uicourse/uicourseinfox/${courseid}`,
      method: 'get'
    })
  },
  //获取是否已经报名课程
  getisstartcourse(userid,courseid){
    return request({
      url: `/eduservice/uicourse/getstartedlearnx/${userid}/${courseid}`,
      method: 'get'
    })
  },
  //报名课程
  intocourse(userid,courseid){
    return request({
      url: `/eduservice/uicourse/addintocourse/${userid}/${courseid}`,
      method: 'get'
    })
  },
  //根据课程的id 获取 评论的内容
  getcommentinfobyid(page,limit,courseid){
    return request({
      url: `/eduservice/uicourse/getcommentbyid/${page}/${limit}/${courseid}`,
      method: 'get'
    })
  },
  //提交评论
  submitcommentx(eduComment){
    return request({
      url: `/eduservice/uicourse/uicoursecommentsend`,
      method: 'post',
      data: eduComment
    })
  },
  //删除课程总体的评论
  deletecommentzt(id){
    return request({
      url: `/eduservice/uicourse/deletecommentbyid/${id}`,
      method: 'get'
    })
  },
  //添加或者是删除收藏
  addcollectordelete(userid,courseid){
    return request({
      url: `eduservice/uicourse/coursecollect/${userid}/${courseid}`,
      method: 'get'
    })
  },
  //获取用户 是否收藏该课程的信息
  getusercollectinformation(userid,courseid){
    return request({
      url: `/eduservice/uicourse/getusercoursecollectinfo/${userid}/${courseid}`,
      method: 'get'
    })
  },
  //课程下单
  oderthecourse(payentity){
    return request({
      url: `/alipayservice/pay`,
      method: 'post',
      data: payentity
    })
  },
  //查询课程是否下单了
  selectorderui(userid,courseid){
    return request({
      url: `/alipayservice/getlastorderinfo/${userid}/${courseid}`,
      method: 'get'
    })
  },
  //获取课程资料列表
  getcoursefilelist(courseid){
    return request({
      url: `/eduservice/coursefile/getcoursefile/${courseid}`,
      method: 'get'
    })
  }

}
